package com.liwei.thread.testwaitnotify;

public class MyThreadOne extends Thread {
    Object lock;

    public MyThreadOne(Object o) {
        lock = o;
    }

    public void run() {
        try {
            synchronized (lock) {
                System.out.println("Enter MyThreadOne and wait");
                lock.wait();
                System.out.println("MyThreadOne be notified");
            }
        } catch (InterruptedException e) {
        }
    }
}
